# Maintainer: Rémy Oudompheng <remy@archlinux.org>
# Contributor: John D Jones III <jnbek1972 -_AT_- g m a i l -_Dot_- com>
# Generator  : CPANPLUS::Dist::Arch 1.29

pkgname='perl-file-find-rule'
_dist="File-Find-Rule"
pkgver=0.34
pkgrel=8
pkgdesc="Alternative interface to File::Find"
arch=('any')
license=('PerlArtistic' 'GPL')
options=('!emptydirs')
depends=('perl-number-compare' 'perl-text-glob>=0.07')
makedepends=()
url='https://search.mcpan.org/dist/File-Find-Rule'
source=("https://search.mcpan.org/CPAN/authors/id/R/RC/RCLAMP/${_dist}-${pkgver}.tar.gz")
md5sums=('a7aa9ad4d8ee87b2a77b8e3722768712')
sha512sums=('97328a86578942d214f7ac530cc88fc84dc7ef2018db06b8c0c58907a4045e90c9c97d1848ed4f16838bd8ca591aca4fa9f24649c81fd8dfe9efe7a2f9f2722c')

build() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    export PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL=--skipdeps
    perl Makefile.PL
    make
}

check() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    export PERL_MM_USE_DEFAULT=1
    make test
}

package() {
    cd "${srcdir}/${_dist}-${pkgver}"
    unset PERL5LIB PERL_MM_OPT PERL_MB_OPT PERL_LOCAL_LIB_ROOT
    make install INSTALLDIRS=vendor DESTDIR="$pkgdir"
}
